package com.java110.mall.system.export.adapt;

import com.alibaba.fastjson.JSONObject;
import com.java110.dto.data.ExportDataDto;
import com.java110.mall.system.export.IExportDataAdapt;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("exportOwnerCar")
public class ExportOwnerCarAdapt implements IExportDataAdapt {


    @Override
    public SXSSFWorkbook exportData(ExportDataDto exportDataDto) {
        SXSSFWorkbook workbook = null;  //工作簿
        //工作表
        workbook = new SXSSFWorkbook();
        workbook.setCompressTempFiles(false);

        Sheet sheet = workbook.createSheet("业主车辆表");
        Row row = sheet.createRow(0);
        row.createCell(0).setCellValue("车牌号");
        row.createCell(1).setCellValue("业主");
        row.createCell(2).setCellValue("手机号");
        row.createCell(3).setCellValue("车辆类型");
        row.createCell(4).setCellValue("车牌类型");
        row.createCell(5).setCellValue("起租时间");
        row.createCell(6).setCellValue("截止时间");

        JSONObject reqJson = exportDataDto.getReqJson();

        //查询数据
      //  doExportOwnerCar(sheet, reqJson);

        return workbook;
    }


}
